@import '../../../core/index.less';
@import '../../../../node_modules/antd/lib/checkbox/style/index';

@white: #fff;
@blackColor: #383838;
@lightGreyColor: #999;
.ori-recard-root {
    .boxShadow();
    position: relative;

    .card-pic {
        cursor: pointer;
        position: relative;
        user-select: none;
        .select-box {
            position: absolute;
            display: flex;
            justify-content: flex-end;
            padding: 10/@remScale;
            z-index: 1;
            cursor: pointer;
            .my-checkbox {
                position: absolute;
                left: 10/@remScale;
                top: 10/@remScale;
                width: 30/@remScale;
                height: 30/@remScale;
                border-radius: 50%;
                color: @white;
                transition: all .5s;
                opacity: 0;
                background: rgba(0, 0, 0, 0.5);
                display: flex;
                justify-content: center;
                align-items: center;
                &.checked {
                    opacity: 1;
                    background: @light-blue-color;
                }

            }
            &:hover {
                //background: rgba(255, 255, 255, 0.3);
                .my-checkbox {
                    @media (min-width: @max1) {
                        opacity: 1;
                    }
                    &.can-not-check {
                        background: rgba(0, 0, 0, 0.3);
                    }
                }
            }

            &.can-not-check {
                cursor: not-allowed;
                background: rgba(255, 255, 255, 0.3);
                .my-checkbox {
                    opacity: 1;
                    &.can-not-check {
                        background: rgba(0, 0, 0, 0.3);
                    }
                }
            }
            &.mask {
                //display: none;
                @media (max-width: @max1) {
                    position: absolute;
                    top: 0;
                    left: 0;
                    bottom: 0;
                    right: 0;
                    display: block;
                }
            }
            @media (max-width: @max1) {
                display: none;
                &:hover {
                    background: none;
                    .my-checkbox {
                        opacity: 0;
                        &.checked {
                            opacity: 1;
                        }
                    }
                    &.is-checked {
                        background: rgba(255, 255, 255, 0.3);
                    }
                    &.can-not-check {
                        cursor: not-allowed;
                        background: rgba(255, 255, 255, 0.3);
                        .my-checkbox {
                            opacity: 1;
                            &.can-not-check {
                                background: rgba(0, 0, 0, 0.3);
                            }
                        }
                    }
                }
            }
        }

        .card-pic-folder {
            height: 220/@remScale;
            width: 100%;
            display: flex;
            background: @white;
            flex-direction: column;
            padding: 12/@remScale 12/@remScale 0;
            @media (max-width: 1700px) {
                height: 200/@remScale;
            }
            @media (max-width: 1500px) {
                height: 200/@rem;
            }
            @media (max-width: @max3) {
                height: 220/@rem;
            }
            @media (max-width: 1250px) {
                height: 200/@rem;
            }
            @media (max-width: @max1) {
                height: 160/@rem;
            }

            .fold-wrapper {
                display: flex;
                flex: 1;
                background: #f3f6f8;
                text-align: center;
                .icon-folder {
                    width: 120/@remScale;
                    height: 105/@remScale;
                    @media (max-width: @max1) {
                        width: 60/@remScale;
                        height: 55/@remScale;
                    }
                }
            }

        }
        .art-count{
            @media(min-width: @max1){
                display: none;
            }
            height: 30/@remScale;
            width: 100%;
            display: flex;
            align-items: center;
            background: @white;
            padding: 0 12/@remScale;
            .count-wrapper{
                width:100%;
                border-top: 1/@remScale solid #dcdfe6;
                .icon-folder{
                    margin:0 4/@remScale 0 0;
                    width:15/@remScale;
                    height: 15/@remScale;
                }
                .text{
                    font-size:11/@remScale;
                    color:@black-hover-auxiliary;
                }
            }
        }

        .left-top-exhibition {
            padding: 0 12/@remScale;
            font-size: 12/@remScale;
            color: @white;
            background: rgba(0, 0, 0, 0.6);
            position: absolute;
            top: 8/@rem;
            left: 8/@remScale;
            z-index: 1;
            height: 24/@remScale;
            line-height: 24/@remScale;
            border-radius: 2/@remScale;
        }

        .user-info {
            padding: 0 10/@rem;
            top: 10/@rem;
            width: 100%;
            z-index: 1;
            font-size: 12/@remScale;
            display: flex;
            position: absolute;
            align-items: center;
            .user-avatar {
                border: 1/@remScale solid @white;
            }
            span {
                color: @white;
                line-height: 27/@remScale;
                margin-left: 8/@remScale;
                .text-overflow-1();
            }
        }

        .head-tool-bar {
            height: 34/@rem;
            width: 34/@rem;
            right: 10/@rem;
            top: 10/@rem;
            background: rgba(0, 0, 0, 0.6);
            border-radius: 50%;
            text-align: center;
            padding-top: 1/@rem;
            display: none;
            z-index: 1;
            span {
                color: @white;
                line-height: 27/@remScale;
            }
            position: absolute;
            &:hover {
                background: rgba(0, 0, 0, 0.8);
            }
        }

        @media (max-width: @max1) {
            .head-tool-bar {
                // display:none;
            }
        }

        .gradient {
            width: 100%;
            position: relative;
            background-color: @white;
            .card-version-wrapper {
                .card-version-icon {
                    position: absolute;
                    bottom: 8/@remScale;
                    left: 8/@remScale;
                    background: rgba(0, 0, 0, 0.6);
                    color: @white;
                    width: 26/@remScale;
                    height: 26/@remScale;
                    display: flex;
                    border-radius: 4/@remScale;
                    .version-icon {
                        width: 18/@remScale;
                        height: 18/@remScale;
                    }
                }
                .card-version {
                    position: absolute;
                    bottom: 40/@remScale;
                    left: 8/@remScale;
                    background: rgba(0, 0, 0, 0.6);
                    color: @white;
                    font-size: 12/@remScale;
                    padding: 5/@remScale;
                    border-radius: 4/@remScale;
                    display: none;
                }
                &:hover {
                    .card-version {
                        display: block;
                    }
                }
            }
            .video-mask {
                position: absolute;
                top: 0;
                width: 100%;
                height: 100%;
                background: rgba(0, 0, 0, 0.4);
                color: @white;
                display: flex;
                align-items: center;
                justify-content: center;
                .video-icon {
                    width: 40/@remScale;
                    height: 30/@remScale;
                    opacity: 0.2;
                }
                .tutorial-icon {
                    opacity: 0.6;
                    width: 35/@remScale;
                    height: 35/@remScale;
                    &:hover {
                        opacity: 1;
                    }
                }
                .video-icon-small {
                    width: 25/@remScale;
                    height: 15/@remScale;
                    opacity: 0.6;
                }
            }
            .card-pic-img {
                height: 100%;
                width: 100%;
                object-fit: cover;
                user-select: none;
                vertical-align: top;
            }
            &.has-height {
                height: 220/@remScale;
                @media (max-width: 1700px) {
                    height: 200/@remScale;
                }
                @media (max-width: 1500px) {
                    height: 200/@rem;
                }

                @media (max-width: @max3) {
                    height: 220/@rem;
                }
                @media (max-width: 1250px) {
                    height: 200/@rem;
                }
                @media (max-width: @max1) {
                    height: 160/@rem;
                }

            }
            &.video {
                background-color: #777777;
                .card-pic-img {
                    object-fit: contain;
                }
            }
        }

        .head-tool-popmenu {
            .boxShadow();
            position: absolute;
            right: 10/@rem;
            top: 55/@rem;
            width: 83/@rem;
            min-height: 40/@rem;
            background: @white;
            z-index: 2;
            border-radius: 4/@remScale;

            li {
                width: 100%;
                height: 40/@rem;
                line-height: 40/@rem;
                font-size: 14/@rem;
                text-align: center;
                &:first-child {
                    border-top-left-radius: 4/@remScale;
                    border-top-right-radius: 4/@remScale;
                }
                &:last-child {
                    border-bottom-left-radius: 4/@remScale;
                    border-bottom-right-radius: 4/@remScale;
                }
                &:hover {
                    color: @light-blue-color;
                    background: #F3FBFE;
                }
            }

            &::after {
                border: 6/@rem solid transparent;
                border-bottom: 6/@rem solid @white;
                width: 0;
                height: 0;
                position: absolute;
                content: ' ';
                top: -12/@rem;
                right: 12/@rem;
            }
        }
        &:hover {
            // .card-pic-img {
            //     filter: brightness(108%);
            // }

            .gradient {
                .play-mask {
                    opacity: 1;
                    @media (max-width: @max1) {
                        opacity: 0;
                    }
                }
            }

            .head-tool-bar {
                display: block;
            }
            .my-checkbox {
                opacity: 1;
                &.can-not-check {
                    background: rgba(0, 0, 0, 0.3);
                }
            }
            .card-version-wrapper {
                display: none;
            }
        }

    }
    .card-text-container {
        position: relative;
        padding: 0 12 / @rem;
        font-size: 14 / @rem;
        display: flex;
        align-items: center;
        background-color: @white;
        .boxShadow();
        &.social {
            height: 50 / @rem;
            border-top: 1/@remScale solid @cut-line-color;
        }
        &.pc{
            @media(max-width: @max1){
                display: none;
            }
        }
        .avatar {
            flex: 1;
            display: flex;
            align-items: center;
            .user-name {
                color: @black-auxiliary-text;
                margin-left: 8/@remScale;
                .text-overflow(1);
            }
            .user-avatar {
                width: 34/@remScale;
                height: 34/@remScale;
            }
        }
        .card-title {
            cursor: pointer;
            flex: 1;
            height: 50 / @rem;
            line-height: 50 / @rem;
            color: @black-three;
            font-weight: normal;
            // text-overflow: ellipsis;
            // white-space: nowrap;
            // overflow: hidden;
            user-select: none;
            .text-overflow(1);
            &.text-center {
                text-align: center;
            }

            &:hover {
                color: @mainColor;
            }
        }
        .is-showed {
            position: relative;
            color: @cancel-btn-color;
            .icon-intro {
                z-index: 3;
                background: @white;
                display: none;
                position: absolute;
                top: 30/@remScale;
                right: -35/@remScale;
                width: 60/@remScale;
                .boxShadow();
                padding: 5/@remScale;
                font-size: 12/@remScale;
                color: @mainColor;
            }
            &:hover {
                .icon-intro {
                    display: block;
                }
            }
        }
        .give-like-wrapper {
            color: @black-auxiliary;
            font-size: 12/@remScale;
            display: flex;
            align-items: center;
            margin-right: 15/@remScale;
            .give-like-btn {
                display: flex;
                align-items: center;
                color: @black-auxiliary;
                font-size: 12/@remScale;
                position: relative;
                &.give {
                    color: @light-blue-color;
                }
                &.collect {
                    color: #ffc600;
                }
                .orin-sw-reicon-root {
                    margin-right: 6/@remScale;
                    width: 16/@remScale;
                    height: 16/@remScale;
                }
                .iconAnimation();
            }
            &:last-child {
                margin-right: 0;
            }
        }
        &.gallery{
            display: flex;
            flex-wrap: wrap;
            padding: 0/@remScale 8/@remScale 4/@remScale;
            .addr{
                width: 100%;
                height: 26/@remScale;
                line-height: 26/@remScale;
                color: @mainTextColor;
                font-size: 14/@remScale;
                text-overflow: ellipsis;
                white-space: nowrap;
                overflow: hidden;
                // &:hover{
                //     text-decoration: underline;
                // }
            }
            .exhibition-info{
                width: 100%;
                height: 24/@remScale;
                line-height: 24/@remScale;
                color: @black-hover-auxiliary;
                font-size: 12/@remScale;
                display: inline-flex;
                justify-content: space-between;
                @media (max-width: @max0) {
                    height: 48/@remScale;
                    display: block;
                }
                .follow-btn{
                    font-size: 12/@remScale;
                    cursor: pointer;
                    .follow{
                        color: @light-blue-color;
                        @media (min-width: @max0) {
                            &:hover{
                                color: @btn-hover-blue;
                            }
                            &:active{
                                color: @btn-active-blue;
                            }
                        }
                    }
                    .followed{
                        color: @black-hover-auxiliary;
                        @media (min-width: @max0) {
                            &:hover{
                                color: @black-cancel-hover;
                            }
                        }
                    }
                }
            }
            // justify-content: space-between;
        }
    }
    .card-text-container-phone{
        position: relative;
        padding: 0 12 / @rem;
        font-size: 14 / @rem;
        display: flex;
        align-items: center;
        background-color: @white;
        @media(min-width: @max1){
            display: none;
        }
        .card-title {
            cursor: pointer;
            flex: 1;
            height: 50 / @rem;
            line-height: 50 / @rem;
            color: @black-three;
            font-weight: normal;
            // text-overflow: ellipsis;
            // white-space: nowrap;
            // overflow: hidden;
            user-select: none;
            .text-overflow(1);
            &.text-center {
                text-align: center;
            }
        }
    }
    .folder-bottom {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        background: rgba(0, 0, 0, 0);
        align-items: center;
        .folder-bottom-top {
            height: 8/@remScale;
            width: 95%;
            background: @white;
            z-index: 0;
            .boxShadow();
        }
        .folder-bottom-bottom {
            height: 8/@remScale;
            width: 90%;
            background: @white;
            .boxShadow();
        }
    }

    &:hover {
        box-shadow: 0 2/@remScale 1/@remScale rgba(97, 108, 121, 0.1),
        0 8/@remScale 30/@remScale 3/@remScale rgba(21, 111, 170, 0.21);
    }
    &.no-box-shadow {
        box-shadow: none;
        &:hover {
            box-shadow: none;
        }
    }
    @media (max-width: @max1) {
        &:hover {
            box-shadow: none;
        }
    }
}



